﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataTablesInlineDemo.aspx.cs"
  Inherits="SEP.Admin.DataTableExample" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/media/images/favicon.ico" />
  <title>DataTables Demo for SEP</title>
  <style type="text/css" title="currentStyle">
    @import "../DataTables/media/css/demo_page.css";
    @import "/media/css/header.ccss";
    @import "../DataTables/media/css/demo_table.css";
  </style>
  <script type="text/javascript" language="javascript" src="../DataTables/media/js/jquery.js"></script>
  <script type="text/javascript" language="javascript" src="../DataTables/media/js/jquery.dataTables.js"></script>
  <script type="text/javascript" charset="utf-8">
    $(document).ready(function () {
      $('#dynamic').html('<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>');

      //grab the column headers from where c# code left it, convert to a real JSON object (not a string)
      jsonstring_ColumnHeadersFromCSharp = document.getElementById("jsonColumnHeaders").value;
      jsonColumnHeaders = jQuery.parseJSON(jsonstring_ColumnHeadersFromCSharp);
      jsonstring_DataFromCSharp = document.getElementById("jsonDataSource").value;
      jsonstring_DataFromCSharp = [['Daniel', 'Whisenhunt'], ['System', 'User'], ['spencer', 'martel'], ['', ''], ['', 'test organization'], ['', ''], ['Tammy', 'Styons'], ['Tammy', 'Styons'], ['', 'The Best Doctor Around'], ['', 'The Best Doctor Around'], ['', 'The Charleston Medical Practice'], ['', 'The Best Doctor Around'], ['', 'The Best Doctor Around'], ['', 'The Charleston Medical Practice'], ['', 'Test Org3'], ['first', 'last'], ['', 'nested org'], ['', 'i am brilliant'], ['', 'maybe not so brilliant'], ['', 'fucking stupid'], ['', 'okay really this is my last try'], ['', 'Blackbaud'], ['', 'Blackbaud'], ['', 'Blackbaud'], ['', 'Blackbaud'], ['', 'Blackbaud'], ['', 'test org2'], ['', 'The Charleston Medical Practice'], ['', 'The Charleston Medical Practice'], ['', 'Blackbaud'], ['', 'The Charleston Medical Practice'], ['', 'Convio'], ['', 'test org2'], ['', 'The Best Doctor Around'], ['', 'The Best Doctor Around'], ['', 'Blackbaud'], ['', 'The Charleston Medical Practice'], ['', 'test org2'], ['', 'Don Peterson'], ['', 'Convio'], ['', 'Test Org3'], ['', 'Rugmaster'], ['', 'Test Org3'], ['', 'The Charleston Medical Practice'], ['', ''], ['', 'The Charleston Medical Practice'], ['', 'new org'], ['', 'please work'], ['', 'asdfads'], ['', 'Test Org3'], ['', 'adfasfdas'], ['', 'Coastal Climbing'], ['', 'maybe this will work'], ['', 'yes an org'], ['Joseph', 'Styons'], ['Dr. William', 'Freeman'], ['Joseph', 'Styons'], ['', ''], ['Joseph R.', ''], ['', 'another org'], ['dumb ', 'ass'], ['yay', 'boo'], ['', 'last try'], ['', 'Blackbaud'], ['', 'The Charleston Medical Practice'], ['', 'The Charleston Medical Practice'], ['', 'Test Org3'], ['', 'Test Org2'], ['', 'new org yay'], ['', 'bbec org'], ['', 'yay'], ['', 'new org'], ['', 'Test Org3'], ['', 'The Charleston Medical Practice'], ['', 'Blackbaud'], ['', 'The Best Doctor Around']];
      //jsonDataSource = jQuery.parseJSON(jsonstring_DataFromCSharp);

      $('#example').dataTable({
        "aaData": jsonstring_DataFromCSharp,
        "aoColumns": jsonColumnHeaders
      });
    });
  </script>
</head>
<body>
  <form id="form1" runat="server">
  <div>
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
    </table>
  </div>
  <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default.aspx">Home</asp:HyperLink>
  </form>
</body>
</html>
